Wireless communication devices—such as cellphones and smartphones—are enormously popular and represent a significant consumer electronics market. Increasingly, such devices are structured as an Application Processing Engine (APE) executing IP-based applications (commonly known as “apps”). The wireless device additionally includes a modem subsystem, including a transceiver, which implements the wireless data link between the device and a subscriber network, and which also executes apps.
FIG. 1 depicts this basic functional division of a wireless device 10 into a modem subsystem 12, and an APE 14. The modem subsystem 12 includes a transceiver 16 operative to exchange data with a network via one or more antennas 17, a packet inspection function 18, and an IP stack 20. The modem subsystem 12 may execute apps 22, reserving port numbers in the modem subsystem IP stack 20. The APE 14 additionally executes apps 22, reserving port numbers in an APE IP stack 24. The wireless device 10 thus maintains two different IP stacks 20, 24, but in many cases, it is assigned only one IP address. The single IP address must be shared between both IP stacks 20, 24.
To account for this, the packet inspection function 18 of the modem subsystem 12 inspects the IP addresses of all incoming packets received by the transceiver 16. The packet inspection function 18 forwards incoming packets to either the modem subsystem IP stack 20 or the APE IP stack 24, depending on the port number of each incoming packet. In particular, the packet inspection function 18 forwards incoming packets having a port number used by the modem IP stack 20 to the modem IP stack 20, and forwards all other packets to the APE IP stack 24. This works well if the modem subsystem IP stack 20 and APE IP stack 24 maintain mutually exclusive port numbers.
However, in the case that an app executing on the modem subsystem 12 registers a port number on the modem subsystem IP stack 20, and the address was previously registered by an app executing on the APE 14, a conflict arises. Future incoming IP packets addressed to the conflicting port number will be routed by the packet inspection function 18 to the modem subsystem IP stack 20. The APE IP stack 24 will simply stop receiving packets, with no warning or error message. Additionally, the packets intended for the APE app 22 may make no sense to, or cause erratic behavior of, the modem subsystem app 22.